---
id: 65822308ded1ba4632f66aa3
title: Step 4
challengeType: 20
dashedName: step-4
---

# --description--

A dictionary is another built-in data type in Python. A dictionary is a collection of data in the form of *key*-*value* pairs. Dictionaries are defined with curly braces `{}` and they contain key-value pairs separated by commas. Each key is followed by a colon `:` and the value:

```py
{'amount': 50.0, 'category': 'Food'}
```

In the example above, `'amount'` and `'category'` are keys, and `50.0` and `'Food'` are their corresponding values.

Create a dictionary with a key `'amount'` and value of the `amount` parameter and pass your new dictionary to the `.append()` call.

# --hints--

You should have `expenses.append({'amount': amount})` in your function.

```js
assert.match(code, /^\s+expenses\.append\s*\(\s*\{\s*("|')amount\1\s*:\s*amount\s*\}\s*\)/m)
```

# --seed--

## --seed-contents--

```py
--fcc-editable-region--
def add_expense(expenses, amount, category):
    expenses.append()
--fcc-editable-region--

expenses = []
```
